import request from '~/utils/request';

//全款
export function setParkingOrderPayMode(data) {
    return request({
        url: '/Parking/SetParkingOrderPayMode',
        method: 'POST',
        data,
    });
}
export function getParkingArea(projectId) {
    //查询车位区域信息
    return request({
        url: '/Parking/GetParkingAreaApi?projectId=' + projectId,
        method: 'GET',
    });
}
export function getParkingDataList(data) {
    //查询车位信息
    return request({
        url: '/Parking/GetParkingDataList',
        method: 'POST',
        data,
    });
}

export function getParkingDataInfo(id) {
    //查询单条车位信息
    return request({
        url: '/Parking/GetParkingDataInfo?id=' + id,
        method: 'GET',
    });
}
export function judgeParkingState(id) {
    //车位 判断车位状态
    return request({
        url: '/Parking/JudgeParkingState?parkingid=' + id,
        method: 'GET',
    });
}
export function getParkingPlanItemInfo(id) {
    //车位 当前进行中的最新营销价格及明细ID
    return request({
        url: '/Parking/GetParkingPlanItemInfo?id=' + id,
        method: 'GET',
    });
}
export function getParkingPlanPackageByItemID(id) {
    //车位 指定营销活动明细送套餐
    return request({
        url: '/Parking/GetParkingPlanPackageByItemID?id=' + id,
        method: 'GET',
    });
}
export function getParkingPlanLoanByPlanId(id) {
    //车位 指定营销活动0首付
    return request({
        url: '/Parking/GetParkingPlanLoanByPlanId?id=' + id,
        method: 'GET',
    });
}
export function getParkingPlanCarByItemID(id) {
    //车位 指定营销活动明细送汽车
    return request({
        url: '/Parking/GetParkingPlanCarByItemID?id=' + id,
        method: 'GET',
    });
}

export function getParkingFavoriteInfo(data) {
    //判断车位是否收藏
    return request({
        url: '/Parking/GetParkingFavoriteInfo?id=' + data,
        method: 'GET',
    });
}
export function saveParkingFavorite(data) {
    //业主添加收藏
    return request({
        url: '/Parking/SaveParkingFavorite',
        method: 'POST',
        data,
    });
}

//租售车位
export function getParkingRentList(data) {
    return request({
        url: '/Parking/GetParkingRentList',
        method: 'POST',
        data,
    });
}

//发布车位
export function saveParkingRentInfo(data) {
    return request({
        url: '/Parking/SaveParkingRentInfo',
        method: 'POST',
        data,
    });
}

//根据订单id查询订单详情
export function getParkingOrderInfo(id) {
    return request({
        url: '/Parking/GetParkingOrderInfo?id=' + id,
        method: 'get',
    });
}

//根据订单id查询订单详情
export function getParkingOrderSingleInfo(id) {
    return request({
        url: '/Parking/GetParkingOrderSingleInfo?id=' + id,
        method: 'get',
    });
}

//浏览记录
export function saveParkingView(data) {
    return request({
        url: '/Parking/SaveParkingView',
        method: 'POST',
        data,
    });
}

//浏览记录
export function getParkingViewList(data) {
    return request({
        url: '/Parking/GetParkingViewList',
        method: 'POST',
        data,
    });
}
//浏览记录
export function getParkingViewListForOwner(data) {
    return request({
        url: '/Parking/GetParkingViewListForOwner',
        method: 'POST',
        data,
    });
}

//收藏
export function getParkingFavoriteList(data) {
    return request({
        url: '/Parking/GetParkingFavoriteList',
        method: 'POST',
        data,
    });
}
//根据用户id查询收藏
export function getParkingFavoriteListForOwner(data) {
    return request({
        url: '/Parking/GetParkingFavoriteListForOwner',
        method: 'POST',
        data,
    });
}
//获取车位区域图片
export function getParkingAreaById(areaId) {
    return request({
        url: '/Parking/GetParkingAreaById?areaId=' + areaId,
        method: 'GET',
    });
}

//获取 车位公告
export function getNoticeByParkingId(parkingId) {
    return request({
        url: '/Parking/GetNoticeByParkingId?parkingId=' + parkingId,
        method: 'GET',
    });
}

//租售车位列表
export function getParkingRentInfo(id) {
    return request({
        url: '/Parking/GetParkingRentInfo?id=' + id,
        method: 'GET',
    });
}
export function getParkingOrderList(data) {
    //车位订单列表信息
    return request({
        url: '/Parking/GetParkingOrderList',
        method: 'POST',
        data,
    });
}

//获取营销方案
export function getParkingPlanInfo(id) {
    return request({
        url: '/Parking/GetParkingPlanInfo?id=' + id,
        method: 'GET',
    });
}
//获取活动详情公告
export function getNoticeByProjectId(projectId) {
    return request({
        url: '/Parking/GetNoticeByProjectId?projectId=' + projectId,
        method: 'GET',
    });
}

//生成订单
export function saveParkingOrder(data) {
    return request({
        url: '/Parking/SaveParkingOrder',
        method: 'POST',
        data,
    });
}

//支付定金，支付前处理
export function ownerPaymentBefore(data) {
    return request({
        url: '/Parking/OwnerPaymentBefore',
        method: 'POST',
        data,
    });
}
//支付定金，支付后处理业务
export function ownerPayment(data) {
    return request({
        url: '/Parking/OwnerPayment',
        method: 'POST',
        data,
    });
}

//取消订单
export function setParkingOrderState(data) {
    return request({
        url: '/Parking/SetParkingOrderState',
        method: 'POST',
        data,
    });
}

//开发商审核订单
export function setParkingOrderDepositState(data) {
    return request({
        url: '/Parking/SetParkingOrderDepositState',
        method: 'POST',
        data,
    });
}
//开发商确认订单认购协议
export function setParkingOrderContractState(data) {
    return request({
        url: '/Parking/SetParkingOrderContractState',
        method: 'POST',
        data,
    });
}
//开发商确认订单购车协议
export function setParkingOrderAgreementState(data) {
    return request({
        url: '/Parking/SetParkingOrderAgreementState',
        method: 'POST',
        data,
    });
}

//开发商确认收到全款
export function setParkingOrderIsFullPay(data) {
    return request({
        url: '/Parking/SetParkingOrderIsFullPay',
        method: 'POST',
        data,
    });
}
//开发商确认收到贷款
export function setParkingOrderIsComplete(data) {
    return request({
        url: '/Parking/SetParkingOrderIsComplete',
        method: 'POST',
        data,
    });
}
//开发商结算赠品
export function setParkingOrderGiftState(data) {
    return request({
        url: '/Parking/SetParkingOrderGiftState',
        method: 'POST',
        data,
    });
}
//开发商结算赠品
export function setParkingOrderCoinState(data) {
    return request({
        url: '/Parking/SetParkingOrderCoinState',
        method: 'POST',
        data,
    });
}

//开发商数据统计  根据时间统计每天的销售量，浏览量，收藏量
export function getCompanyStatistics(data) {
    return request({
        url: '/Parking/GetCompanyStatistics',
        method: 'POST',
        data,
    });
}
//支付记录列表
export function ownerPaymentList(data) {
    return request({
        url: '/Parking/OwnerPaymentList',
        method: 'POST',
        data,
    });
}
//支付单条记录
export function ownerPaymentInfo(data) {
    return request({
        url: '/Parking/OwnerPaymentInfo',
        method: 'POST',
        data,
    });
}
//开发商数据统计  根据时间统计每天的销售量
export function getParkingOrderStatisticsByBuildingID(data) {
    return request({
        url: '/Parking/GetParkingOrderStatisticsByBuildingID',
        method: 'POST',
        data,
    });
}
//开发商数据统计  根据时间统计每天的浏览量
export function getParkingViewStatisticsByBuildingID(data) {
    return request({
        url: '/Parking/GetParkingViewStatisticsByBuildingID',
        method: 'POST',
        data,
    });
}
//开发商数据统计  根据时间统计每天的收藏量
export function getParkingFavoriteStatisticsByBuildingID(data) {
    return request({
        url: '/Parking/GetParkingFavoriteStatisticsByBuildingID',
        method: 'POST',
        data,
    });
}
// 统计我的业主的已购买业主
export function getOwnerParkingOrderStatistics(data) {
    return request({
        url: '/Parking/GetOwnerParkingOrderStatistics',
        method: 'POST',
        data,
    });
}
// 统计我的业主的收藏量
export function getOwnerParkingFavoriteStatistics(data) {
    return request({
        url: '/Parking/GetOwnerParkingFavoriteStatistics',
        method: 'POST',
        data,
    });
}
// 车位 当前进行中的最新营销活动
export function getParkingPlanItemInfoByParkingID(id) {
    return request({
        url: '/Parking/GetParkingPlanItemInfoByParkingID?id=' + id,
        method: 'GET',
    });
}
//开发商创建套餐订单
export function createParkingPackageOrder(data) {
    return request({
        url: '/Parking/CreateParkingPackageOrder',
        method: 'POST',
        data,
    });
}
//业主提货订单列表
export function ownerTakeOrderList() {
    return request({
        url: '/Parking/OwnerTakeOrderList',
        method: 'POST',
    });
}
//我的车位
export function getParkingOrderListForOwnerOfMy(data) {
    return request({
        url: '/Parking/GetParkingOrderListForOwnerOfMy',
        method: 'POST',
        data,
    });
}
//根据cardid查询得汽车信息
export function getParkingPlanCar(id) {
    return request({
        url: '/Parking/GetParkingPlanCar?id=' + id,
        method: 'GET',
    });
}
//车位订单 取付款账号信息 通过公司ID\
export function getBankInfoByCompanyID(id) {
    return request({
        url: '/Parking/GetBankInfoByCompanyID?id=' + id,
        method: 'GET',
    });
}
//车位订单 取付款账号信息
export function getBankInfoByBuildingID(id) {
    return request({
        url: '/Parking/GetBankInfoByBuildingID?id=' + id,
        method: 'GET',
    });
}

//车位订单 取付款账号信息 通过营销活动ItemID
export function getBankInfoByItemID(id) {
    return request({
        url: '/Parking/GetBankInfoByItemID?id=' + id,
        method: 'GET',
    });
}
//选中套餐
export function setParkingPackage(data) {
    return request({
        url: '/Parking/SetParkingPackage',
        method: 'POST',
        data,
    });
}

//营销活动
export function getParkingPlanList(data) {
    return request({
        url: '/Parking/GetParkingPlanList',
        method: 'POST',
        data,
    });
}
// 指定活动中的车位信息：
export function getParkingDataListByPlanID(data) {
    return request({
        url: '/Parking/GetParkingDataListByPlanID',
        method: 'POST',
        data,
    });
}
// 代理审核营销方案：
export function setPlanAgentState(data) {
    return request({
        url: '/Parking/SetPlanAgentState',
        method: 'POST',
        data,
    });
}
